<template>
  <router-view />
</template>

<script>
import tags from './store/tags';
export default {
  created() {
    let store = this.$store
    window.onbeforeunload = function () {
      sessionStorage.setItem("tags", JSON.stringify(store.state.tags.tagList))
      sessionStorage.setItem("admins", JSON.stringify(store.state.AddAdmin.admins))
    }
  },
  mounted() {
    let store = this.$store
    let tags = JSON.parse(sessionStorage.getItem("tags"))
    let admin = JSON.parse(sessionStorage.getItem("admins"))
    if (tags) {
      store.state.tags.tagList = tags
    }
    sessionStorage.removeItem("tags")
    if (admin) {
      store.state.AddAdmin.admins = admin
    }
    sessionStorage.removeItem("admins")
  }
}
</script>


<style lang="less">
body {
  padding-right: 0px !important;
  margin: 0px;
  overflow: -Scroll;
  overflow-y: hidden;
}

// 图标
.tubiao {
  margin-right: 5px;
}

.el-popup-parent--hidden {
  padding-right: 0px !important;
}

// 进度条
// #nprogress .bar {
//   background: #f90 !important; //自定义颜色
// }

// 添加图片
.avatar-uploader .avatar {
  width: 178px;
  height: 178px;
  display: block;
}

.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--el-transition-duration-fast);
}

.avatar-uploader .el-upload:hover {
  border-color: var(--el-color-primary);
}

.el-icon.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  text-align: center;
}
</style>
